from sqlalchemy.orm import registry, Session
from sqlalchemy import create_engine
from conf.config import Base_URI

Base = registry().generate_base()
engine = create_engine(Base_URI, echo=False)
session = Session(engine)


def save_item(item: Base):
    session.begin()
    session.add(item)
    session.commit()
